/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package observer;

import cbaApplication.*;
import commonSources.Painel;

/**
 *
 * @author Filipe
 */
public class ObserverPubText implements IObserver {

    private CBA cba;
    private Painel texto;

    public ObserverPubText(CBA cba) {
        this.cba = cba;
    }

    public Painel getState() {
        return texto;
    }

    public void setState(Painel pathToImage) {
        this.texto = pathToImage;
    }

    public void update(Painel keyword) {
        setState(keyword);
        cba.getUi().getLabelPubText().setText(keyword.getTexto());
    }
}
